package com.wanxi.random;

public class MyMath {
    public static void main(String[] args) {
//        [0.0,1.0)之间的随机数
        double random = Math.random();
//        int v = (int) (random * 10);
//        System.out.println(v);
        System.out.println(random);
//        地板：floor向下取整
//        ceil向上取整
//Math.ceil(11);
//        Math.round()四舍五入
        int floor = (int) Math.floor(random * 10);
        System.out.println(floor);
    }
}
